import { request } from '@umijs/max';

export const queryUserList = async () =>
  await request(`/user/list`, {
    method: 'GET',
  });

export const addUser = async (data: { name: string; password: string }) =>
  await request(`/user/add`, {
    method: 'POST',
    data,
  });

export const deleteUser = async (data: { name: string }) =>
  await request(`/user/delete`, {
    method: 'POST',
    data,
  });
